package com.clown.smsdao.coursemanage.domain;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.clown.smsbase.Domain.BaseEntity;

import javax.persistence.*;
import java.util.List;

@Entity
public class CourseKind extends BaseEntity<Long> {
    /*
     Author:GZQ
     */

    @Column
    String name;
    @JsonIgnoreProperties(value = "courseKind", allowSetters = true)
    @OneToMany(mappedBy = "courseKind",cascade = {CascadeType.REMOVE,CascadeType.REFRESH},fetch = FetchType.LAZY)
    private List<Course> courses;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<Course> getCourses() {
        return courses;
    }

    public void setCourses(List<Course> courses) {
        this.courses = courses;
    }
}
